LoginTimeout Property (Remote Data)

       

Returns or sets a value that specifies the number of seconds the ODBC driver manager waits before a timeout error occurs when a connection is opened.

Syntax

object.LoginTimeout [= value]

The LoginTimeout property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A Long integer representing the number of seconds the driver manager waits before timing out and returning an error.

Remarks

If value is 0, no timeout occurs and an error does not occur if a connection cannot be established. If you are not using asynchronous connections, this might cause your application to block indefinitely.

When you're attempting to connect to an ODBC database, such as SQL Server, there may be delays due to network traffic or heavy use of the ODBC data source. Rather than waiting indefinitely, you can specify how long to wait before the ODBC driver manager produces an error.

The default timeout value is either 15 seconds or a value set by the rdoDefaultLoginTimeout property. When used with an rdoEnvironment object, the LoginTimeout property specifies a global value for all login operations associated with the rdoEnvironment. The LoginTimeout setting of on an rdoConnection object overrides the default value.

If the specified timeout exceeds the maximum timeout in the data source, or is smaller than the minimum timeout, the driver substitutes that value and the following error is logged in the rdoErrors collection: SQLState 01S02 "Option value changed."

Typically, a connection to a remote server on a Local Area Network (LAN) takes under eight seconds to complete. Remote Access Service (RAS) or Internet connections can take far longer depending on Wide Area Network bandwidth, load and other factors.